/*
 * Hyuga: A Density-Grid Stream Clustering Platform.
 * Copyright (C) 2014 PUC-Rio/Laboratory for Advanced Collaboration
 *
 * Hyuga is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * Hyuga is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with Hyuga.  If not, see <http://www.gnu.org/licenses/>.
 */
package br.pucrio.inf.lac.konoha.hyuga.events.semantics;

import java.util.Set;

import br.pucrio.inf.lac.konoha.hyuga.common.Pair;

/**
 * Represent a new context partition (cell) clustering event that is not within any existing cluster, that is, all 
 * clusters do not contains this cell.
 * 
 * @author Marcos Roriz <mroriz@inf.puc-rio.br>
 */
public class MergeGridClusterEvent {

    private Set<Pair<Integer, Integer>> coreCells;
    
    /**
     * Empty Constructor
     */
    public MergeGridClusterEvent() {}
    
    public MergeGridClusterEvent(Set<Pair<Integer, Integer>> coreCells) {
        this.coreCells = coreCells;
    }
    
    public Set<Pair<Integer, Integer>> getCoreCells() {
        return coreCells;
    }
    
    public void setCoreCells(Set<Pair<Integer, Integer>> coreCells) {
        this.coreCells = coreCells;
    }

    @Override
    public String toString() {
        String delim = "";
        String clusterCells = "";
        for (Pair<Integer, Integer> cell : coreCells) {
            clusterCells += delim + "(" + cell.getFirst() + "," + cell.getSecond() + ")";
            delim = ",";
        }
        return "MERGED CLUSTER @ " + clusterCells;
    }
}